import 'package:flutter/services.dart';
import 'package:permission_handler/permission_handler.dart';

class PermissionConfig{

  static Future<void>  initialize() async {
    await _initStorage();
  }

  static Future<void> _initStorage()async {
     if (await Permission.storage.isDenied || await Permission.storage.isPermanentlyDenied) {
       final state = await Permission.storage.request();
       if (!state.isGranted) {
         await SystemNavigator.pop();
       }
     }
   }
}
